IF(MNN_BUILD_PROTOBUFFER)
    file(GLOB MNN_COMPRESSION_PROTO_SRCS ${CMAKE_CURRENT_LIST_DIR}/generated/*)
    include_directories(${CMAKE_CURRENT_LIST_DIR}/generated/)
ELSE()
    protobuf_generate_cpp(MNN_COMPRESSION_PROTO_SRCS MNN_COMPRESSION_PROTO_HDRS
        ${CMAKE_CURRENT_LIST_DIR}/MNN_compression.proto
    )
ENDIF()

file(GLOB CALIBRATION_SRC ${CMAKE_CURRENT_LIST_DIR}/*.cpp)
add_library(MNNCompress OBJECT ${CALIBRATION_SRC} ${MNN_COMPRESSION_PROTO_SRCS})
target_include_directories(MNNCompress PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/)
list(APPEND MNN_CONVERTER_BACKENDS_OBJECTS $<TARGET_OBJECTS:MNNCompress>)
list(APPEND MNN_CONVERTER_BACKENDS_TARGETS MNNCompress)
